<template>
    <ChildComponent @updateMessage="handleMessage" />
</template>

<script setup>
import { ref } from 'vue';
import ChildComponent from './ChildComponent.vue';

const message = ref('');

function handleMessage(newMessage) {
    message.value = newMessage;
}
</script>